package Models

//type Brands struct {
//	Id   uint   `gorm:"primary_key"`
//	Name string `gorm:"unique;type:varchar(50);not null"` // 唯一
//	Logo string `gorm:"type:varchar(200);null"`
//	//AddTime   string `gorm:"type:varchar(200);not null"`
//	IsDeleted int `gorm:"column:is_deleted;type:int(10)"` // 和go的保留字冲突

//Namea string `gorm:"index:na"` // 设置索引
//}
import (
	"github.com/shopspring/decimal"
)

type RecruitJob struct {
	Id                      int             `json:"id" gorm:"primary_key"`
	BusinessId              int             `json:"business_id" gorm:"type:int(10);index:bid;not null"`
	PositionCustomName      string          `json:"position_custom_name" gorm:"type:varchar(100);null"`
	PositionCategoryChildId int             `json:"position_category_child_id" gorm:"type:int(10);not null"`
	WorkExp                 uint            `json:"work_exp" gorm:"type:smallint;not null"`
	Education               uint            `json:"education" gorm:"type:smallint;not null"`
	Salary1                 decimal.Decimal `json:"salary1" gorm:"type:decimal(10,2);default:0.00"`
	Salary2                 decimal.Decimal `json:"salary2" gorm:"type:decimal(10,2);default:0.00"`
	SalaryMonth             uint            `json:"salary_month" gorm:"type:int;not null"`
	Welfare                 string          `json:"welfare" gorm:"type:varchar(100);not null"`
	City                    int             `json:"city" gorm:"type:int;not null"`
	Area                    int             `json:"area" gorm:"type:int;not null"`
	Email                   string          `json:"email" gorm:"type:varchar(60);not null"`
	Release                 string          `json:"release" gorm:"type:varchar(60);not null"`
	ReleaseJob              string          `json:"release_job" gorm:"type:varchar(60);not null"`
	JobType                 uint            `json:"job_type" gorm:"type:tinyint;not null"`
	ReleaseMobile           string          `json:"release_mobile" gorm:"type:varchar(20);not null"`
	Describe                string          `json:"describe" gorm:"type:varchar(100);not null"`
	Hot                     uint            `json:"hot" gorm:"type:tinyint;not null;default:1;comment:'1默认 2热门招聘'"`
	Show                    uint            `json:"show" gorm:"type:tinyint;not null;default:2;comment:'1待审核 2审核通过 3审核不通过'"`
	Status                  uint            `json:"status" gorm:"type:tinyint;not null;default:2;comment:'状态 1正常，3关闭 2招聘中'"`
	IsDeleted               uint            `json:"is_deleted" gorm:"type:int(10);default:0"`
	CreatorId               int             `json:"creator_id" gorm:"type:int(10)"`
	CreatedAt               int             `json:"created_at" gorm:"type:int"`
	UpdatedAt               int             `json:"updated_at" gorm:"type:int"`
	DeletedAt               int             `json:"deleted_at" gorm:"type:int"`
}

func (RecruitJob) TableName() string {
	return "recruit_job"
}
